<script type="text/javascript">
    var updateCount = function() {
        s = document.getElementById("s");
        r = 140 - s.value.length;
        tc = document.getElementById("tc");
        tc.innerHTML = r;
    }
</script>
<form method="post" action="/twitter/tweet">
<textarea class="mll short" name="status" maxlength="140" id="s" onkeyup="updateCount();"></textarea>
<div class="sep10"></div>
<div class="fr"><input type="submit" value="Tweet" class="super normal button" /></div>
{% if rate_limit %}
<small class="fade">Now tweeting from @<strong><a href="/twitter/user/{{ member.twitter_screen_name }}" class="dark">{{ member.twitter_screen_name }}</a></strong>
<div class="sep3"></div>
<strong><span class="snow">API Rate Limit:</span> {{ rate_limit.remaining_hits }} / {{ rate_limit.hourly_limit }}</strong></small>
{% endif %}
</form>
<script type="text/javascript">
    var focusStatus = function() {
        s = document.getElementById("s");
        s.focus();
    }
    
    setTimeout("focusStatus()", 200);
</script>